Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it?
Patterns like
^embedding|keywords|blend$mean^embeddingORkeywordsORblend$. So values such asxkeywordspass the validator and later fail with a 500. This wraps the alternatives in a group in 16 patterns across 10 files, for example^(embedding|keywords|blend)$.Closes #7877
Summary of your change
xkeywords,registerx,xuser) are now rejected with the validator message. Exact values behave as before. DRFCharFieldtrims whitespace before validators run, soblendstill passes asblend.type(i_tool_node.py): before, things likeinteger,pointorarray[string]passed validation, because they containintorarray. Thenvalid_reference_valuelogged "Unsupported this type" and passed the value through. Now they fail validation. The UI only sendsstring, int, dict, array, float, boolean, so UI users are not affected. A workflow saved through the raw API or an old import with such a type would now fail validation. I could not check database data for this.string|int|dict|array|float|booleanis kept exactly as it is at HEAD. It matches the UI options andvalid_reference_value.ToolInputFieldinapps/tools/serializers/tool.pyhas the same two patterns, but nothing references the class. If you want it changed, its type list does not includeboolean, and that is your decision.valid_typeallowsknowledge, butmodel_message_dictonly has the keydataset, sovalid/knowledge/50still returns a 500 before and after this PR. This is a separate bug.CharFieldplusRegexValidatorusing the real patterns from the source. The old patterns accepted 12,445 wrong values. The new ones accept 0, and no valid value is rejected. A 3,000 example Hypothesis property also passed. I also ranpython -m py_compileon the 10 changed files,typoson them, andruff checkgives the same findings as before.Please indicate you've done the following:
Validated with Claude Opus 5.5.